import Vue from 'vue';
import store from '@/store';
import service from '@/service';
import { bootstrap, Router } from '@/core';
import sdk from '@/sdk';
import '@/filter';
import App from './App';

Vue.config.productionTip = false;

App.mpType = 'app';

// Add Router
Vue.prototype.$_router = Router;

// Add href
Vue.prototype.$href = url => {
    parent.location.href = url;
};

// Add service
Vue.prototype.$service = service;

// 各大平台sdk集合
Vue.prototype.$sdk = sdk;

// 统计
Vue.prototype.$hmt = {
    push(action, desc = '') {
        // #ifdef H5
        _hmt.push(['_trackEvent', '百亿补贴', action, desc]);
        // #endif
    }
};

// #ifdef H5
bootstrap({ store });
// #endif

new Vue({
    ...App,
    store
}).$mount();
